-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miscellaneous Pipeline Changes #326
Conversation
Hold off on this one @johlju - I'm not sure why Integration tests are failing. There wasn't any change that would have affected that so it may be something that has changed with the agent. |
No worries. Let me know when it is ready to review. 🙂 |
…terManagementDsc into Issue-324-and-325
Hi @johlju - this PR is now ready to review. I had to make some additional changes to get the tests to pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 4 files at r1, 6 of 6 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @PlagueHO)
source/DSCResources/DSC_ScheduledTask/DSC_ScheduledTask.psm1, line 1955 at r3 (raw file):
-not $force -and
Shouldn't this be $force -and
(remove -not
) otherwise this will be done when Force -eq $false
.
Looks like there is no unit test for that scenario so it wasn't caught. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 7 of 9 files reviewed, 1 unresolved discussion (waiting on @johlju)
source/DSCResources/DSC_ScheduledTask/DSC_ScheduledTask.psm1, line 1955 at r3 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
-not $force -and
Shouldn't this be
$force -and
(remove-not
) otherwise this will be done whenForce -eq $false
.Looks like there is no unit test for that scenario so it wasn't caught. 🙂
The logic is actually correct based on the intent, but due to the double negatives isn't obvious. So I added a comment to clarify. I also added one more test to confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good. Didn't look at the logic close enough. 🙂
Reviewed 2 of 2 files at r4.
Reviewable status: complete! all files reviewed, all discussions resolved
Closing and reopening to kick of the tests again since it failed on. I have seen this when the previous run is to fast to the LCM haven't time to cooldown.
In xWebAdministration and SqlServerDsc I have added the following helper function between tests where this happens (not everywhere though). Might be better to add it to |
Thanks for that @johlju . In other resources we used to use the Reset-Dsc function that was part of the Test initialization and/or test helper, but this got eliminated by the move to the new CI process. I meant to add something back in but haven't had time. I created this many years back for xPSDesiredStateConfiguration I think. Anyway, I'll aim to roll your fix in. |
Sidenote: the reason why we decided to force the LCM to stop (Reset-Dsc) rather than to wait is that the LCM on occasion took a long time to complete so forcing a stop resulted in faster test completion in these situations. xPSDesiredStateConfiguration was very problematic here (often jamming up multiple times in a single CI run). |
Aha, so maybe that is why we are starting to see these error because "Reset-Dsc" was removed. I'm good with |
I'm OK either way - but it would be good if we could unify the functions everywhere. E.g. Perhaps create a DscResource.TestHelper module that contains some of this shared code. Not that it is really a big deal replicating it between modules. Anyway, I've raised some issues in they key repos where this is a problem and will address when I get time (need to do some more module conversions to new CI tonight). |
I agree a test helper module would be great, I thought about that too. |
Pull Request (PR) description
Update ModuleBuilder to Latest.
Merge HISTORIC_CHANGELOG.md into CHANGELOG.md.
Change Azure DevOps Pipeline trigger to include
source/*
.This PR also includes a fix for #323.
I also a known issue info to address #294.
This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
@johlju - would you mind reviewing for me?
This change is